package cn.duhengkui.national.valuelist.example.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Isolation;
import org.springframework.transaction.annotation.Transactional;

import cn.duhengkui.national.valuelist.example.dao.BookinfoDao;
import cn.duhengkui.national.valuelist.example.entity.Bookinfo;
import cn.duhengkui.national.valuelist.example.service.BookInfoService;
import cn.duhengkui.national.valuelist.example.vo.MyBook;

@Service
public class BookInfoServiceImpl implements BookInfoService{

	@Autowired
	private BookinfoDao bookinfoDao;
	
	@Transactional(isolation = Isolation.READ_COMMITTED)
	public void save(Bookinfo bookInfo){
		bookinfoDao.save(bookInfo);
	}
	
	@Transactional(isolation = Isolation.READ_COMMITTED,readOnly=true)
	public List<MyBook> getMyBooks() {
		return bookinfoDao.getMyList();
	}

}
